﻿using AppDesigner.Shared;
using System.Windows.Input;

namespace AppDesigner.ViewModel
{
    public class MainViewModel : BindableViewModel
    {
        #region Fields
        private ToolBoxViewModel _toolBoxViewModel;
        private DrawViewModel _drawViewModel;
        private PagesPanelViewModel _pagesPanelViewModel;
        private ICommand _loadCommand;
        #endregion

        #region Properties

        public ToolBoxViewModel ToolBoxViewModel
        {
            get
            {
                if (_toolBoxViewModel == null)
                {
                    _toolBoxViewModel = new ToolBoxViewModel();
                }
                return _toolBoxViewModel;
            }
        }

        public DrawViewModel DrawViewModel
        {
            get
            {
                if (_drawViewModel == null)
                {
                    _drawViewModel = new DrawViewModel();
                }
                return _drawViewModel;
            }
        }

        public PagesPanelViewModel PagesViewModel
        {
            get
            {
                if (_pagesPanelViewModel == null)
                {
                    _pagesPanelViewModel = new PagesPanelViewModel();
                }
                return _pagesPanelViewModel;
            }
        }

        public ICommand LoadCommand
        {
            get { return _loadCommand ?? new RelayCommand(LoadExecute); }
        }

        #endregion

        #region Method

        private void LoadExecute()
        {
        }

        #endregion

    }
}
